import { defineStore } from 'pinia'
import { ref } from 'vue'

export const permissionStoreService = defineStore(
  'permission',
  () => {
    const permission = ref({})

    const setPermission = newInfo => {
      permission.value = newInfo
    }

    const removePermission = () => {
      permission.value = {}
    }

    return {
      permission,
      setPermission,
      removePermission
    }
  },
  { persist: true }
)
